Systems and methods for learning to extract relations from text via user feedback

ABSTRACT

According to some embodiments, a system and method are provided to extract relationships from unstructured text documents. The method comprises receiving a training set of sentences that comprise labeled objects and subjects for creating an initial relationship model. A set of unlabeled sentences may be received. Objects and subjects from the set of unlabeled sentences are determined based on the initial model and the determined objects and subjects from the set of unlabeled sentences are displayed to a user for feedback and approval. An indication of whether the determined objects and subjects from the set of unlabeled sentences are correct is received and the initial relationship model is updated based on the received indication.

BACKGROUND

Extracting relationships from unstructured text remains a challengingproblem because conventional approaches work based on either usingmanually-defined extraction rules, which tend to be very brittle, orlearning relationships from text, which usually requires 1000s ofhand-curated training examples. Unstructured text such as, but notlimited to, unstructured log files, industrial asset shop visit reports,electronic medical data is not annotated. Having a domain expertmanually annotate 1000s of examples from such datasets to develop newextraction rules is extremely time consuming and costly.

It would therefore be desirable to provide a system to extractrelationships from unstructured text that requires neither 1000s ofhand-curated examples nor text mining expertise.

SUMMARY

Some embodiments described herein relate to a system and a method toextract relationships from text. The method comprises receiving atraining set of sentences that comprise labeled objects and subjects forcreating an initial relationship model. A set of unlabeled sentences maybe received. Objects and subjects from the set of unlabeled sentencesmay be determined based on the initial model and the determined objectsand subjects from the set of unlabeled sentences may be displayed to auser for approval. An indication of whether the determined objects andsubjects from the set of unlabeled sentences are correct may be receivedand the initial relationship model may be updated based on the receivedindication.

A technical advantage of some embodiments disclosed herein are improvedsystems and methods for the early alerting of potential problemsassociated with assets prior to secondary damage being done to the assetand/or the asset's surroundings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a system in accordance with some embodiments.

FIG. 2 illustrates a method in accordance with some embodiments.

FIG. 3 illustrates a process in accordance with some embodiments.

FIG. 4 illustrates a process in accordance with some embodiments.

FIG. 5 illustrates a system according to some embodiments.

FIG. 6 illustrates a portion of a database according to someembodiments.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are setforth in order to provide a thorough understanding of the embodiments.However, it will be understood by those of ordinary skill in the artthat the embodiments may be practiced without these specific details. Inother instances, well-known methods, procedures, components and circuitshave not been described in detail so as not to obscure the embodiments.

The present embodiments relate to a system and method associated withdynamically defining new relations from unstructured text by annotatinga small number (e.g., less than 30) examples instead of 1000s ofexamples as required by the prior art. The system described herein mayalso be interactive in nature by providing feedback and validation toimprove the accuracy of determined relation extraction rules over time.For example, the system described herein may allow domain experts togradually define new relations over a period of time without needing anyexpertise in text mining. Moreover, users may only be expected toprovide the system with a few annotations over time to determine newrelations and the system may automatically learn and improve from theuser feedback and interaction.

Now referring to FIG. 1, an embodiment of a system 100 is illustrated.As illustrated in FIG. 1, the system 100 may comprise a computer 110that electronically stores an unstructured text document. The system 100further comprises a relationship platform 120 to determine relations inthe unstructured text document. The computer 110 may comprise, but isnot limited to, a general computing device or an industrial asset. Anindustrial asset may comprise, but is not limited to, generators, gasturbines, power plants, manufacturing equipment on a production line,aircraft engines, wind turbines that generate electricity on a windfarm, power plants, locomotives, healthcare or imaging devices (e.g.,X-ray or MRI systems) for use in patient care facilities, or drillingequipment for use in mining operations.

The relationship platform 120 may receive a training set of sentencescomprising labeled objects and subjects for creating an initialrelationship model from the computer 110. Once the initial relationshipmodel has been created, the relationship platform 120 may receive anunstructured document comprising unlabeled sentences. From the unlabeledsentences, objects and subjects may be determined based on the initialmodel. The relationship platform 120 may display the determined objectsand subjects from the unlabeled sentences to a user and wait for theuser to indicate (e.g., an approval from the user) whether thedetermined relationship (e.g., the relationship between the subject andobject) is correct. The relationship platform 120 may receive, from theuser, an indication of whether each determined object and subject fromthe unlabeled sentences is correct. Moreover, the initial relationshipmodel may be updated based on the received indication to improveperformance of the model. The process of determining a relation fromunstructured text will now be described in more detail with respect toFIG. 2, FIG. 3 and FIG. 4.

Now referring to FIG. 2, a method 200 that might be performed by therelationship platform 120 of the system 100 described with respect toFIG. 1 is illustrated according to some embodiments. The flow chartdescribed herein does not imply a fixed order to the steps, andembodiments of the present invention may be practiced in any order thatis practicable. Note that any of the methods described herein may beperformed by hardware, software, or any combination of these approaches.For example, a non-transitory computer-readable storage medium may storethereon instructions that when executed by a machine result inperformance according to any of the embodiments described herein.

Method 200 may relate to machine learning of user-defined relations froman unstructured text based on a limited amount of initial training databy incorporating user interaction and feedback with an initialrelationship model to improve the extraction accuracy over time.

Now referring to 210, a training set of sentences comprising labeledobjects and subjects for creating an initial relationship model isreceived. The training set of sentences may be provided from a user thathas annotated a small number of sentences (e.g., 15-20 sentences perdefined relation) with information such as the relation name and asubject and an object for each defined relation.

For purposes of illustrating features of the present embodiments, somesimple examples will now be introduced and referenced throughout thedisclosure. Those skilled in the art will recognize that these examplesare illustrative and are not limiting and are provided purely forexplanatory purposes.

A training set of sentences may comprise the following sentences:“Barack Obama was born on August 4, 1961.”; “Mitch McConnell was born onFebruary 20, 1942.”; and “Paul Ryan was born on January 29, 1970”. Eachsentence may be annotated with a subject and an object. For example, thefirst sentence may be annotated with a subject of Barack Obama and anobject of Aug. 4, 1961 where the relationship is labeled as “born on”.Similarly, the next two training sentences may be annotated withsubjects of Mitch McConnell and Paul Ryan, respectively, and objectsFeb. 20, 1942 and Jan. 29, 1970, respectively.

The embodiments described herein may learn both a syntactic context anda semantic context in which the subject and object appear from theannotated examples. The syntactic context and the semantic context mayfurther be used to generate a set of relation extraction rules in a formof semantic regular expressions. The learnt extraction rules may furtherbe applied to unlabeled sentences to extract new subject-object pairsassociated with one or more user-defined relations per sentence.

At 220, a set of unlabeled sentences may be received. The unlabeledsentences may be received as a second training set of sentences or maybe a portion of an unstructured text document. The unlabeled sentencesmay comprise a set of sentences that include similar objects andsubjects as the training set but are unlabeled (e.g., the unlabeledsentences do not comprise annotated subjects and objects). A system mayautomatically extract initial subjects, objects and relations, and thenselect a sample from the processed sentences and present them to theuser for feedback and validation.

Continuing with the above examples, the unlabeled sentences may comprisethe following sentences: “Bill Clinton was born in Arkansas on August19, 1946.” and “George Bush was born in Connecticut on July 6, 1946”.

At 230, objects and subjects from the set of unlabeled sentences aredetermined based on the initial model. Based on the initial training setand the initial training model, the system may attempt to determine anobject and subject from each sentence of the set of unlabeled sentences.In a first example, for the sentence “Bill Clinton was born in Arkansason August 19, 1946.”, the system may determine a subject of Bill Clintonwith an object of Arkansas. At 240, the determined object and subjectfrom each of the set of unlabeled sentences may be displayed to a userfor approval. Users may provide feedback on the accuracy of the subject,accuracy of the object and on the relationship label for thesubject-object pairs. Additionally, users may annotate additionalsubjects or objects in the sampled sentence that the system failed totag. Continuing with the above example, the system may present to theuser the sentence of “Bill Clinton was born in Arkansas on August 19,1946.” and indicate that the subject is Bill Clinton and the object isArkansas.

At 250 an indication of whether the determined objects and subjects fromthe set of unlabeled sentences are correct may be received. The receivedindication may be used by the system to evolve the extraction rules. Theupdated extraction rules may be reapplied on the remaining untaggedsentences to extract new subject-object pairs for user validation.Continuing with the above example, the user may indicate that, in regardto the sentence “Bill Clinton was born in Arkansas on August 19, 1946”,the presented subject is correct (i.e., Bill Clinton) and the user mayalso indicate that the presented object (i.e., Arkansas) is incorrect.Furthermore, the user may indicate that the correct object should havebeen “August 19, 1946” for the relation “born on”. Next, at 260, theinitial relationship model may be updated based on the receivedindication. Updating may comprise updating information in a databaseassociated with the initial relationship model. This loop may continueuntil the system reaches a desired level of accuracy after which thesystem may be used for text classification without periodic userfeedback (although users can always choose to provide feedback on moresentences and further train the model if they so choose).

Continuing with the above example, the system may present to the userthe sentence of “George Bush was born in Connecticut on July 6, 1946”and indicate that presented subject of “George Bush” and the presentedobject of “July 6, 1946” for the relation “born on” is correct. The usermay indicate that the presented subject is correct (i.e., George Bush)and the user may indicate that the presented object is also correct(i.e. Jul. 6, 1946).

The method 200 of FIG. 2 may be explained in more detail with respect toFIG. 3. The process 300, of FIG. 3, may be performed by the relationshipplatform 120 of the system 100 described with respect to FIG. 1. Theprocess flow described herein does not imply a fixed order to the steps,and embodiments of the present invention may be practiced in any orderthat is practicable. Note that any of the methods described herein maybe performed by hardware, software, or any combination of theseapproaches. For example, a non-transitory computer-readable storagemedium may store thereon instructions that when executed by a machineresult in performance according to any of the embodiments describedherein.

At 310, a system may begin by receiving an unstructured and unannotatedtext document 370 provided by a user. The system or the user may selecta small sample of sentences from the unstructured and unannotated textdocument 370 to serve as training samples to bootstrap the process 300.For each sentence in the training samples, the user may annotateinformation such as a relation name, a subject and an object for thedefined relation. The annotated sentences may be submitted to a rulelearning algorithm that may associate the defined relation with theannotated subject and the annotated object. Extracting the relation maycomprise two phases: a learning phase and an extraction phase.

During the learning phase, the system may learn a general extractionrule for every relation based on the syntactic and semantic patternsthat appear in the training samples 310. To identify common syntacticpatterns for a given relation, the system may first identify word tokens340 that appear between the subject and object in the training examples.For example, in the sentence “Barack Obama was born on August 4, 1961”,the words “was born on” appear between the subject “Barack Obama” andthe object “August 4, 1961”. As such, the words “was born on” compriseword tokens 340. Word tokens may be defined as the words located betweenthe subject and the object.

The system may further extend the list of word tokens 340 by identifyingsimilar words using a word embedding model 350 that is trained based onthe original small sampling of unstructured, annotated text trainingsamples 310. Furthermore, the current analysis provides an initial listof word tokens 340 which may be generated as a word token list. The topX word tokens (e.g., where X is a whole number such as 5) may be used todetermine similar word tokens such as synonyms which may be retrievedfrom a data base and these similar word tokens may be added to the listof word tokens and assigned a weight. For example, the original wordsfrom the unstructured and unannotated text document may be assigned aweight of 1 (e.g., “was born on” is assigned a weight of 1), whereas theweight of the extended similar words 360 may be set to a similarityscore based on the original words (e.g., the determined word tokens). Inthis example, tokens of “has a birth date of” and “birthday” may bedetermined. The word token “has a birth date of” may be assigned aweight of 2 and “birthday” may be assigned a weight of 3.

The system may also use a concept tagger 320 to determine semanticrelationships (e.g., relationships based on a meaning of the words),determine domains and determine a range of objects and subjects of asentence. The concept tagger 320 may tag the unstructured andunannotated text document so that the words of the unstructured andunannotated text document may be matched to labels that are defined inthe model and are associated with known relations. In some embodiments,the concept tagger 320 may perform string matches to the existing labelsin the model. In some embodiments, the concept tagger 320 may identifythe semantic type for the subject and object by mapping them to knownentities from a knowledge graph.

Common semantic patterns may be identified by learning the domain andrange 330 for a given relation. The semantic type of the subject maytypically be referred to as the domain and the semantic type of theobject may be referred to as the range of any given relation.

Continuing with the above example, based on analyzing the sentence“Barack Obama was born on August 4, 1961.”, Barack Obama is the domainand the system may classify Barack Obama as either a politician, apresident or a person based on a semantic analysis. Furthermore, therange might be “birth date”. This analysis may be performed for all datasamples and then a most frequent pair may be selected. Determining thedomain may be based on matching subjects to a database of previouslydefined subjects to learn more about the subject. In some embodiments,data associated with the subject may be hard coded in software insteadof using a database query. For example, in the original example relatedto Barack Obama, Mitch McConnell and Paul Ryan, Barack Obama is a formerpresident and the other two are politicians. Therefore, for thisexample, the domain will be determined to be “politician” since allthree individuals are politicians but only one is a former president.Regarding the example of related to “George Bush was born in Connecticuton July 6, 1946” and “Bill Clinton was born in Arkansas on August 19,1946”, since both men are former presidents and politicians, the domainmay be either “president” or “politician”.

The system described herein may select a most frequently occurringsubject-object semantic type pair as the domain and range for therelation. The learnt domain, range and the word token list may be usedto generate a set of semantic regular expressions 380 which form thebasis for the relation extraction rule. A semantic regular expressionmay take the form of “Domain word token(s) Range.”

The system may then use these semantic regular expressions during theextraction phase to extract relations 390 such as new subject-objectpairs from the unstructured and unannotated text corpus 370. In doingso, the system may select a sample from the newly tagged sentences andpresent them to a user for feedback and validation and, in response, theuser may provide feedback on the accuracy of the subject, object and therelationship label for the subject-object pair. For example, and nowreferring to FIG. 4, samples 420 may be selected from an unstructuredtext corpus 410 and, based on these samples 420, a rule learningalgorithm 440 may learn a general pattern from the samples 420.Additionally, users may annotate 430 additional subjects or objects inthe sampled sentence that the system failed to tag. The user feedbackmay be used to fine-tune a semantic regular expression. In parallel togenerating samples, a syntactic analysis 450 of the text corpus 410 anda semantic analysis 460 of the text corpus 410 may be performed. Thesyntactic analysis 450 and the semantic analysis 460 of the corpus maybe used in conjunction with the rule learning algorithm to generate anextraction rule 470.

For system maintenance, being able to determine relations fromunannotated text may be used to build anomaly databases from log filesso that fault monitoring of industrial assets may more accuratelydetermine anomalies from operating data and/or from log data.Determining anomalies in an industrial asset prior to the industrialasset breaking down can minimize downtime to the industrial asset sincethe industrial asset can be taken offline at a convenient time.Furthermore, finding relations based on anomalies, and as such makingquicker determinations about anomalies, can prevent an industrial assetfrom causing damage to the industrial asset or its surroundings. In areal-world example, determining a likelihood of a locomotive failingbased on relations in a log file may provide an early indication of awheel warping or an engine breaking down which can prevent loss of railservice or potentially loss of life should the locomotive derail.

Note the embodiments described herein may be implemented using anynumber of different hardware configurations. For example, FIG. 5illustrates a relationship platform 500 that may be, for example,associated with the system 100 of FIG. 1. The relationship platform 500may provide a technical and commercial advantage by receiving a trainingset of sentences comprising labeled objects and subjects for creating aninitial relationship model and display determined objects and subjectsfrom unlabeled sentences for feedback.

The relationship platform 500 may comprise a processor 505(“processor”), such as one or more commercially available CentralProcessing Units (CPUs), coupled to a communication device 515configured to communicate via a communication network (not shown in FIG.5). The communication device 515 may be used to communicate, forexample, with one or more users. The relationship platform 500 furtherincludes an input device 510 (e.g., a mouse and/or keyboard to enterinformation about relations) and an output device 520 (e.g., to outputand display the data to a user).

The processor 505 also communicates with a memory/storage device 530that stores data 535. The storage device 530 may comprise anyappropriate information storage device, including combinations ofmagnetic storage devices (e.g., a hard disk drive), optical storagedevices, mobile telephones, and/or semiconductor memory devices. Thestorage device 530 may store a program and/or processing logic forcontrolling the processor 510. The processor 505 performs instructionsof the programs, and thereby operates in accordance with any of theembodiments described herein. For example, the processor 505 may receivedata such as, but not limited to, unannotated sentences and may create amodel based on the received data.

The programs may be stored in a compiled, compressed, uncompiled and/orencrypted format or a combination. The programs may furthermore includeother program elements, such as an operating system, a databasemanagement system, and/or device drivers used by the processor 505 tointerface with peripheral devices. The storage device 530 may compriseor may function in conjunction with a database engine 540 to read andwrite to a database such as database 600.

FIG. 6 is a tabular view of a portion of a database 600 in accordancewith some embodiments of the present invention. The table includesentries associated with text documents such as, but not limited to,syntactic and semantic properties. The table also defines fields 602,604, 606, 608, 610 and 612 for each of the entries. The fields, forexample, may specify: a document ID 602, a first syntactic or semanticproperty 604, a second syntactic or semantic property 606, a thirdsyntactic or semantic property 608, a fourth syntactic or semanticproperty 610, and an nth syntactic or semantic property 612. Theinformation in the database 600 may be periodically created and updatedbased on the examination of each newly received unstructured andunannotated text document.

The document ID 602 might be a unique alphanumeric code identifying aspecific document and the syntactic or semantic properties602/604/606/608/610/612 might provide information related to featuresassociated with a specific document such as, but not limited to,subjects and objects and their associated spellings, meanings, variants,and synonyms.

As used herein, information may be “received” by or “transmitted” to,for example: (i) the relationship platform 500 from another device; or(ii) a software application or module within the relationship platform500 from another software application, module, or any other source.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

The process flow and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

It should be noted that any of the methods described herein can includean additional step of providing a system comprising distinct softwaremodules embodied on a computer readable storage medium; the modules caninclude, for example, any or all of the elements depicted in the blockdiagrams and/or described herein; by way of example and not limitation,a geometrical compensation module. The method steps can then be carriedout using the distinct software modules and/or sub-modules of thesystem, as described above, executing on one or more hardwareprocessors. Further, a computer program product can include acomputer-readable storage medium with code adapted to be implemented tocarry out one or more method steps described herein, including theprovision of the system with the distinct software modules.

This written description uses examples to disclose the invention,including the preferred embodiments, and also to enable any personskilled in the art to practice the invention, including making and usingany devices or systems and performing any incorporated methods. Thepatentable scope of the invention is defined by the claims, and mayinclude other examples that occur to those skilled in the art. Suchother examples are intended to be within the scope of the claims if theyhave structural elements that do not differ from the literal language ofthe claims, or if they include equivalent structural elements withinsubstantial differences from the literal languages of the claims.Aspects from the various embodiments described, as well as other knownequivalents for each such aspects, can be mixed and matched by one ofordinary skill in the art to construct additional embodiments andtechniques in accordance with principles of this application.

Those in the art will appreciate that various adaptations andmodifications of the above-described embodiments can be configuredwithout departing from the scope and spirit of the claims. Therefore, itis to be understood that the claims may be practiced other than asspecifically described herein.

What is claimed:
 1. A method to extract relationships from text, themethod comprising: receiving a training set of sentences comprisinglabeled objects and subjects for creating an initial relationship model;receiving a set of unlabeled sentences; determining, via a processor,objects and subjects from the set of unlabeled sentences based on theinitial model; displaying the determined objects and subjects from theset of unlabeled sentences to a user for feedback and approval;receiving an indication of whether the determined objects and subjectsfrom the set of unlabeled sentences are correct; and updating theinitial relationship model based on the received indication.
 2. Themethod of claim 1, wherein the training set of sentences comprises lessthan thirty sentences.
 3. The method of claim 1, wherein creating theinitial relationship model comprises executing a concept tagger againstthe training set of sentences to determine a domain and range of thesentences.
 4. The method of claim 3, wherein creating the initialrelationship model further comprises extracting word tokens from thetraining set of sentences wherein word tokens comprise words that arelocated between the subjects and the objects.
 5. The method of claim 4,wherein creating the initial relationship model further comprisesdetermining extended word tokens comprising synonyms of the extractedword tokens.
 6. The method of claim 5, wherein the extended word tokensare weighted based on a similarity to the extracted word tokens.
 7. Anon-transitory computer-readable medium comprising instructions thatwhen executed by a processor perform a method to extract relationshipsfrom text, the method comprising: receiving a training set of sentencescomprising labeled objects and subjects for creating an initialrelationship model; receiving a set of unlabeled sentences; determining,via a processor, objects and subjects from the set of unlabeledsentences based on the initial model; displaying the determined objectsand subjects from the set of unlabeled sentences to a user for feedbackand approval; receiving an indication of whether the determined objectsand subjects from the set of unlabeled sentences are correct; andupdating the initial relationship model based on the receivedindication.
 8. The medium of claim 7, wherein the training set ofsentences comprises less than thirty sentences.
 9. The medium of claim7, wherein creating the initial relationship model comprises executing aconcept tagger against the training set of sentences to determine adomain and range of the sentences.
 10. The medium of claim 9, whereincreating the initial relationship model further comprises extractingword tokens from the training set of sentences wherein word tokenscomprise words that are located between the subjects and the objects.11. The medium of claim 9, wherein creating the initial relationshipmodel further comprises determining extended word tokens comprisingsynonyms of the extracted word tokens.
 12. The medium of claim 11,wherein the extended word tokens are weighted based on a similarity tothe extracted word tokens.
 13. A system to determine an asset event, thesystem comprising: a processor; and a non-transitory computer-readablemedium comprising instructions that when executed by the processorperform a method to extract relationships from text, the methodcomprising: receiving a training set of sentences comprising labeledobjects and subjects for creating an initial relationship model;receiving a set of unlabeled sentences; determining objects and subjectsfrom the set of unlabeled sentences based on the initial model;displaying the determined objects and subjects from the set of unlabeledsentences to a user for feedback and approval; receiving an indicationof whether the determined objects and subjects from the set of unlabeledsentences are correct; and updating the initial relationship model basedon the received indication.
 14. The system of claim 13, wherein thetraining set of sentences comprises less than thirty sentences.
 15. Thesystem of claim 13, wherein creating the initial relationship modelcomprises executing a concept tagger against the training set ofsentences to determine a domain and range of the sentences.
 16. Thesystem of claim 13, wherein creating the initial relationship modelfurther comprises extracting word tokens from the training set ofsentences wherein word tokens comprise words that are located betweenthe subjects and the objects.
 17. The system of claim 16, whereincreating the initial relationship model further comprises determiningextended word tokens comprising synonyms of the extracted word tokens.18. The system of claim 17, wherein the extended word tokens areweighted based on a similarity to the extracted word tokens.